<!DOCTYPE html>
<html lang="en">

<head>
	<{include file="header.html" }>
		<title>分配学员-班级管理-
			<{$user_data[ 'school_name']}>-德安信会计在线教育平台</title>
		<script>
		function allot_class(obj,class_id,class_name) {
			if(confirm('您确定将<{$student_course_detail[ 'name']}>分配到'+class_name+'吗')){
				$(obj).attr("onclick"," ");
				$.post('/student/allot_class_to/<{$student_course_detail['id']}>',{'class_id':class_id},function(res){
			        var obj = eval('(' + res + ')');
			        if(obj.result==0){
			        	alert(obj.msg);
			          	// window.parent.save_close();
			        }else {
			          	alert(obj.msg);
			        }
		    	});
			}
		}

		</script>
</head>

<body>
	<div class="wrap">
		<!--star left-->
		<div class="column">
			<{include file="left_menu.html" }>
		</div>
		<div id="ContMianBox">
			<div class="sub-colum">
                <div class="tit"><{$left_menu_min.menu}></div>
                <ul>
                    <{foreach from=$left_menu_min.list item=item}>
                    <li <{if $item['url'] == $left_menu_min.curr}>class="curr"<{/if}>><a href="<{$item['url']}>"><{$item['name']}></a></li>
                    <{/foreach}>
                </ul>
            </div>
			<!--end子栏目-->
			<!--end left-->
			<div class="container narrow">
				<!--star conter-->
				<div class="cetContent">
					<div class="tit p-lr20">
						<a class="c-40d064" href="/student">学员管理</a><em class="p-lr10 c-CCCCCC fs12">/</em><em>学员分班</em>
					</div>
					<!--star内容区域-->
					<div class="mainScroll">
						<div class="mainContainer line-all">

							<div class="tabMainCont">

								<!--star 编辑基本信息-->
								<div class="tabItem step-02 ">
									<form method="post">

										<!--star-->
										<div class="fix line-all p30 fs14">
											<ul class="LH30">
												<li><label>学员：</label>
													<{$student_course_detail[ 'name']}>
												</li>
												<li><label>课程：</label><span class=""><{$student_course_detail['title']}></span></li>
												<li><label>联系电话：</label><span class=""><{$student_course_detail['phone']}></span></li>
												<li><label>订单号：</label>
													<{$student_course_detail[ 'order_num']}>

												</li>
												<li><label>订单时间：</label>
													<{$student_course_detail[ 'order_time']|date_format: '%Y-%m-%d'}>
												</li>
												<li><label>性别：</label>
													<{if $student_course_detail['sex']==1}>
													男
													<{elseif $student_course_detail['sex']==2}>
													女
													<{else}>
													未知
													<{/if}>
												</li>
												<li><label>生日：</label>
													<{$student_course_detail[ 'birthday']|date_format: '%Y-%m-%d'}>
												</li>
												<li><label>是否在职：</label>
													<{if $student_course_detail['sex']==1}>
													在职
													<{else}>
													非在职
													<{/if}>
												</li>
												<li><label>学历：</label>
													<{if $student_course_detail['edu']==1}>
													高中
													<{elseif $student_course_detail['edu']==2}>
													大专
													<{elseif $student_course_detail['edu']==3}>
													本科
													<{elseif $student_course_detail['edu']==4}>
													研究生
													<{elseif $student_course_detail['edu']==9}>
													其他
													<{else}>
													未知
													<{/if}>
												</li>
												<li><label>微信：</label>
													<{$student_course_detail[ 'wx']}>
												</li>
												<li><label>QQ：</label>
													<{$student_course_detail[ 'qq']}>
												</li>
												<li><label>住址：</label>
													<{$student_course_detail[ 'address']}>
												</li>
											</ul>
											<table class="layui-table" lay-skin="line">
												<colgroup>
													<col width="80">
													<col width="220">
													<col width="100">
													<col>
													<col>
													<col>
													<col>
												</colgroup>

													<{if isset($class_list) && !empty($class_list)}>
													<thead>
														<tr>
															<th>班级编号</th>
															<th>班级名</th>
															<th>校区</th>
															<th>开课时间</th>
															<th>主讲老师</th>
															<th>班主任</th>
															<th></th>
														</tr>
													</thead>
													<tbody>
													<{foreach from=$class_list item=item}>
														<tr>
															<td><{$item['class_num']}></td>
															<td>
																<{$item[ 'class_name']}>
															</td>
															<td>
																<{$item[ 'class_room']}>
															</td>
															<td><span class="c-999999"><{$item['start_time']|date_format: '%Y-%m-%d'}></span></td>
															<td>
																<{$item['lecturer_name']}>
															</td>
															<td>
																<{$item['manage_teacher']}>
															</td>
															<td>
																<{if $student_course_detail['status'] ==0}>
																<a href="javascript:;" class="layui-btn layui-btn-normal" onclick="allot_class(this,'<{$item['id']}>','<{$item[ 'class_name']}>')">分配到该班</a>
																<{/if}>
															</td>
														</tr>
														<{/foreach}>
														<{else}>
														<tr>
															<td colspan="4">
																还没有对应的班级,立即<a href="/classes/add" class="layui-btn layui-btn-normal">开设新班级</a>
															</td>
														</tr>

														<{/if}>
												</tbody>
											</table>
										</div>
										<!--end-->

									</form>
								</div>
								<!--end 编辑基本信息-->

							</div>


						</div>
					</div>
				</div>
				<!--end内容区域-->

				<!--end conter-->
			</div>


		</div>
	</div>
	<{include file="footer.html"}>
	<script>
		layui.use('laydate', function() {
			var laydate = layui.laydate;

			var start = {
				min: laydate.now(-30),
				max: laydate.now(+365),
				istoday: false,
				choose: function(datas) {
					end.min = datas; //开始日选好后，重置结束日的最小日期
					end.start = datas //将结束日的初始值设定为开始日
				}
			};

			var end = {
				min: laydate.now(),
				max: laydate.now(+365),
				istoday: false,
				choose: function(datas) {
					start.max = datas; //结束日选好后，重置开始日的最大日期
				}
			};

			/*document.getElementById('LAY_demorange_s').onclick = function() {
				start.elem = this;
				laydate(start);
			}
			document.getElementById('LAY_demorange_e').onclick = function() {
				end.elem = this
				laydate(end);
			}*/

		});
	</script>

</body>

</html>
